gusucode.com > 忠网网站广告管理系统 ZonGG V1.3 > 忠网网站广告管理系统 ZonGG V1.3\code\GGtiaoMx.asp

    <!-- #INCLUDE FILE="login.asp" -->

<SCRIPT   language="JavaScript">    
var    currentpos,timer;    

function    initialize()    
{    
timer=setInterval("scrollwindow()",10);    
}    
function    sc(){    
clearInterval(timer);    
}    
function    scrollwindow()    
{    
currentpos=document.body.scrollTop;    
window.scroll(0,++currentpos);    
if    (currentpos    !=    document.body.scrollTop)    
sc();    
}    
document.onmousedown=sc    
document.ondblclick=initialize    
</SCRIPT>
<%
	'///*********************************
	'   广告条明细显示程序
	'********************************///

  if not isnumeric(trim(request("id"))) then
  response.write "错误:广告条ID无效!"
  response.end
  else
  id = trim(request("id"))
  end if


if xmltype=1 then ''  xml 存取

    strSourceFile = Server.MapPath(dataxml&"/Advertisement/"&id&"/adv.xml")

 
    Set objXML =Server.CreateObject("Microsoft.XMLDOM")  '创建一个XML对像
   
    objXML.load(strSourceFile)  '把XML文件读入内存     

	Set xml=objXML.documentElement.selectSingleNode("Advertisement")  '选取节点 Advertisement
	
	
	ADid=xml.childNodes.item(0).text
	ADname=xml.childNodes.item(1).text
	ADintro=xml.childNodes.item(2).text
	ADact=xml.childNodes.item(3).text
	ADclass=xml.childNodes.item(4).text
	Pids=xml.childNodes.item(5).text
	Picid=xml.childNodes.item(6).text
	ADurl=xml.childNodes.item(7).text
	ADwindow=xml.childNodes.item(8).text
	ADshow=xml.childNodes.item(9).text
	ADshows=xml.childNodes.item(10).text
	ADclick=xml.childNodes.item(11).text
	ADclicks=xml.childNodes.item(12).text
	ADtime=xml.childNodes.item(13).text
	ADstoptime=xml.childNodes.item(14).text
	ADstarttime=xml.childNodes.item(15).text
	ADxslei=xml.childNodes.item(16).text
	ADcss=xml.childNodes.item(17).text
	Picurl=xml.childNodes.item(18).text
	ADipkg=xml.childNodes.item(19).text	
	
	
	''' 如果是正常显示广告条 检测是否过期,并更新状态
	if ADact="1" then
	    	
		advertvirtualvalue=0
		
		Select Case ADclass
		
			Case 1
			
				if ADclick>=ADclicks then
				advertvirtualvalue=1
				end if
				
			Case 2
			
				if ADshow>=ADshows then
				advertvirtualvalue=1
				end if				
			
			Case 3
			
				if now()>=ADstoptime then
				advertvirtualvalue=1
				end if
			
			Case 4
			
				if ADclick>=ADclicks then
				advertvirtualvalue=1
				end if
				if ADshow>=ADshows then
				advertvirtualvalue=1
				end if			
			
			Case 5
			
				if ADclick>=ADclicks then
				advertvirtualvalue=1
				end if
				if now()>=ADstoptime then
				advertvirtualvalue=1
				end if			
			
			Case 6
			
				if ADshow>=ADshows then
				advertvirtualvalue=1
				end if
				if now()>=ADstoptime then
				advertvirtualvalue=1
				end if
			
			Case 7
		
				if ADclick>=ADclicks then
				advertvirtualvalue=1
				end if
				if ADshow>=ADshows then
				advertvirtualvalue=1
				end if
				if now()>=ADstoptime then
				advertvirtualvalue=1
				end if
		
		
		End Select		
		
		if advertvirtualvalue>=1 then
		xml.childNodes.item(3).text=2
		objXML.save(strSourceFile)
		end if
		

		
	end if
	''''''''''''''''''''''
	
	
	
	Set xml=nothing
	Set objXML =nothing

else ' 数据库存取

		Rs.open "select * from Advertisement where ADid="&id,conn,3,3,1
		if not Rs.eof then
		ADid=Rs(0)
		ADname=Rs(1)
		ADintro=Rs(2)
		ADact=Rs(3)				
		ADclass=Rs(4)
		Pids=Rs(5)
		Picid=Rs(6)
		ADurl=Rs(7)
		ADwindow=Rs(8)
		ADshow=Rs(9)
		ADshows=Rs(10)
		ADclick=Rs(11)
		ADclicks=Rs(12)
		ADtime=Rs(13)
		ADstoptime=Rs(14)
		ADstarttime=Rs(15)
		ADxslei=Rs(16)
		ADcss=Rs(17)
		Picurl=Rs(18)
		ADipkg=Rs(19)
	
		
		
			''' 如果是正常显示广告条 检测是否过期,并更新状态
			if ADact=1 then
			    	
				advertvirtualvalue=0
				
				Select Case ADclass
				
					Case 1
					
						if ADclick>=ADclicks then
						advertvirtualvalue=1
						end if
						
					Case 2
					
						if ADshow>=ADshows then
						advertvirtualvalue=1
						end if				
					
					Case 3
					
						if now()>=ADstoptime then
						advertvirtualvalue=1
						end if
					
					Case 4
					
						if ADclick>=ADclicks then
						advertvirtualvalue=1
						end if
						if ADshow>=ADshows then
						advertvirtualvalue=1
						end if			
					
					Case 5
					
						if ADclick>=ADclicks then
						advertvirtualvalue=1
						end if
						if now()>=ADstoptime then
						advertvirtualvalue=1
						end if			
					
					Case 6
					
						if ADshow>=ADshows then
						advertvirtualvalue=1
						end if
						if now()>=ADstoptime then
						advertvirtualvalue=1
						end if
					
					Case 7
				
						if ADclick>=ADclicks then
						advertvirtualvalue=1
						end if
						if ADshow>=ADshows then
						advertvirtualvalue=1
						end if
						if now()>=ADstoptime then
						advertvirtualvalue=1
						end if
				
				
				End Select		
				
				
				if advertvirtualvalue>=1 then
				Rs(3)=2
				Rs.update				
				ADact=2	
				end if	
		
				
			end if
			''''''''''''''''''''''

			
		end if
		Rs.close


end if



%>
  <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">

  <div align="center">
    <center>
    <table border="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber1" bgcolor="#FFFFFF" height="150">
      <tr height=22>
        <td><a name="top">&nbsp;</a> 加入时间:<font color=red><%=ADstarttime%></font>&nbsp;&nbsp;最新浏览:<font color=red><%=ADtime%></font>&nbsp;&nbsp;最新点击:<font color=red><%=ADstoptime%></font></td>
      </tr>
      <tr  height=22>
        <td>&nbsp; 打开方式:<%= Ggdklx(ADwindow)%> &nbsp;类型:<font class=red><%= Ggxslx(ADxslei)%></font>&nbsp;状态:<font class=red><%=Ggacts(ADact)%></font>&nbsp; 
        浏览数:<font color=red><%=ADshow%></font> (<a href=javascript:opw('GGtiaoCz.asp?a=Ip&i=1&id=<%=ADid%>','ZonGGIp1<%=ADid%>',800,600)>浏览记录</a>)&nbsp;
        点击数:<font color=red><%=ADclick%></font> (<a href=javascript:opw('GGtiaoCz.asp?a=Ip&i=1&id=<%=ADid%>','ZonGGIp1<%=ADid%>',800,600)>点击记录</a>)</td>
      </tr>
            <tr height=22>
        <td>&nbsp; 休眠条件:<%call  Sxtj()%></td>
      </tr>
       <tr>
        <td valign="top">&nbsp; <font class=red>>>></font> 该广告条显示于下列广告位
     	(双击滚屏,单击停止)<br>
        <%dim places
          if Trim(Pids)<>"" then
          places=split(Pids&",",",")
          For i=0 To Ubound(places)-1
          response.write "&nbsp;&nbsp;<font class=red> "&i+1&". </font>"&Ggwm(places(i))&"&nbsp; <font class=red>ID="&places(i)&"</font><br> "          
          next
          end if
        %>
<br>
        </td>
      </tr>       <tr height=22>
        <td align=right><a href="#top">TOP</a>&nbsp;</td>
      </tr>

      </table>
    </center>
</div>
<%

'/********************************************************************
' Sxtj() 广告条时效条件显示过程
'********************************************************************/

Sub Sxtj()
%>
<%
Select Case ADclass

		Case 1
%>
              点击<font color=red><%=ADclicks%></font>次 
              <%
		Case 2

%>
              显示<font color=red><%=ADshows%></font>次 
              <%
 		Case 3
%>
              截止期<font color=red><%=ADstoptime%></font> 
              <%

		Case 4
%>
              点击<font color=red><%=ADclicks%></font>次,显示<font color=red><%=ADshows%></font>次 
              <%

		Case 5
%>
              点击<font color=red><%=ADclicks%></font>次,截止期<font color=red><%=ADstoptime%></font> 
              <%

		Case 6
%>
              显示<font color=red><%=ADshows%></font>次,截止期<font color=red><%=ADstoptime%></font> 
              <%

		Case 7
%>
              点击<font color=red><%=ADclicks%></font>次,显示<font color=red><%=ADshows%></font>次,截止期<font color=red><%=ADstoptime%></font> 
              <%

		Case else
%>
              无限制条件 
         
<%
End Select

end sub

%>